package br.com.webcrm.dao;

import java.io.Serializable;
import java.util.List;

public interface BaseDAO<T, ID extends Serializable> {
	public Class<T> getObjectClass();

	public T gravar(T object);
	
	public T atualizar(T object);

	public T gravarOuAtualizar(T object);

	public void excluir(T object);

	public List<T> consultarTudo();

	public List<T> consultarPorNamedQueryEParametros(String queryName, String [] nomes, Object[] valores);

	public List<T> consultarPorNamedQueryEParametros(String queryName, String [] nomes, Object[] valores, int maximo, int atual);
	
	public List<T> consultarPorQuery(String query);
	
	public List<T> consultarPorNamedQuery(String queryName);

	public T consultarObjeto(String queryName, String [] nomes, Object[] valores);

}